<?php
//员工
namespace app\crm\controller;

use app\crm\model\Sn;
use app\crm\model\StaffAccessory;
use think\Request;
use think\Exception;
use app\crm\model\Staff as StaffModel;
use weworkapi\api\datastructure\user\User;
use weworkapi\api\src\API;


class Downstream extends \CrmController
{

    /**
     * 员工列表接口
     */
    public function index(Request $request){
        $DownstreamModel = new \app\crm\model\Downstream();

        try {
            $params =  delToken($request->get());

            $data = $DownstreamModel->search($params);


            $this->successTerminate($data);
        } catch (Exception $e) {
            $this->serverErrorTerminate($e->getMessage());
        }
    }

    /**
     * 员工简单列表接口
     */
    public function easy(Request $request){
        $DownstreamModel = new \app\crm\model\Downstream();

        try {
            $params =  delToken($request->get());
            $data = $DownstreamModel->easySearch($params);
            $this->successTerminate($data);
        } catch (Exception $e) {
            $this->serverErrorTerminate($e->getMessage());
        }
    }

}
